package com.ityedao.Collection集合体系的特点.Set系列集合;

import java.util.HashSet;
import java.util.Set;

public class HashSetTest {
    public static void main(String[] args) {
        Set<Student> students = new HashSet<>();
        Student s1 = new Student("至尊宝", 28, 169.6);
        Student s2 = new Student("蜘蛛精", 23, 169.6);
        Student s3 = new Student("蜘蛛精", 23, 169.6);

        System.out.println(s2.hashCode());
        System.out.println(s3.hashCode());

        students.add(s1);
        students.add(s2);
        students.add(s3);
        System.out.println(students);
    }
}
